package com.zyb.base.exp;

/**
 * @author ZhuYouBin
 * @version 1.0.0
 * @Date: 2022/10/29 21:30
 * @Description 自定义异常类
 */
public class BizException extends RuntimeException {
    /** 状态码 */
    private Integer statusCode;
    /** 提示信息 */
    private String message;

    public BizException(int statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    public BizException() {
        super();
    }

    public BizException(String message) {
        this.message = message;
    }

    public BizException(String message, Throwable cause) {
        super(message, cause);
    }

    public BizException(Throwable cause) {
        super(cause);
    }

    protected BizException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
